<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <!-- 避免IE使用兼容模式 -->
    <meta http-equiv="X-UA-Compatible" content="IE=edge, chrome=1">
    <meta name="viewport"
          content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
    <meta name="renderer" content="webkit">

    <!-- TopJUI框架样式 -->
    <link type="text/css" href="/static/topjui/themes/default/topjui.core.min.css" rel="stylesheet">
    <link type="text/css" href="/static/topjui/themes/default/topjui.blue.css" rel="stylesheet" id="dynamicTheme"/>
    <!-- FontAwesome字体图标 -->
    <link type="text/css" href="/static/plugins/font-awesome/css/font-awesome.min.css" rel="stylesheet"/>
    <!-- layui框架样式 -->
    <link type="text/css" href="/static/plugins/layui/css/layui.css" rel="stylesheet"/>
    <!-- jQuery相关引用 -->
    <script type="text/javascript" src="/static/plugins/jquery/jquery.min.js"></script>
    <script type="text/javascript" src="/static/plugins/jquery/jquery.cookie.js"></script>
    <!-- TopJUI框架配置 -->
    <script type="text/javascript" src="/static/public/js/topjui.config.js"></script>
    <!-- TopJUI框架核心-->
    <script type="text/javascript" src="/static/topjui/js/topjui.core.min.js"></script>
    <!-- TopJUI中文支持 -->
    <script type="text/javascript" src="/static/topjui/js/locale/topjui.lang.zh_CN.js"></script>
    <!-- layui框架js -->
    <script type="text/javascript" src="/static/plugins/layui/layui.js" charset="utf-8"></script>
</head>

<body>
<!-- datagrid表格 -->
<table data-toggle="topjui-datagrid"
       data-options="id: 'sUserDg',
                fitColumns:true,
                remoteSort:false,
                url: '/sUser/data',
                pageSize: 10">
    <thead>
    <tr>
        <th data-options="field:'uuid',title:'UUID',checkbox:true"></th>
        <th data-options="field:'id',title:'编号',sortable:true,width:30,hidden:true"></th>
        <th data-options="field:'userAccount',title:'帐号',sortable:true,width:80"></th>
        <th data-options="field:'userName',title:'用户姓名',sortable:true,width:50"></th>
        <th data-options="field:'userNickname',title:'用户昵称',sortable:true,width:100"></th>
        <th data-options="field:'userIdType',title:'证件类型',sortable:true,width:50,hidden:true"></th>
        <th data-options="field:'userIdTypeText',title:'证件类型',sortable:true,width:50"></th>
        <th data-options="field:'userIdNo',title:'证件号码',sortable:true,width:100"></th>
        <th data-options="field:'userTel',title:'手机号',sortable:true,width:100"></th>
        <th data-options="field:'userEmail',title:'邮箱',sortable:true,width:100"></th>
        <th data-options="field:'userSts',title:'状态',sortable:true,width:50,hidden:true"></th>
        <th data-options="field:'userStsText',title:'状态',sortable:true,width:50"></th>
    </tr>
    </thead>
</table>

<!-- 表格工具栏开始 -->
<div id="sUserDg-toolbar" class="topjui-toolbar"
     data-options="grid:{
           type:'datagrid',
           id:'sUserDg'
       }">
    <a href="javascript:void(0)"
       data-toggle="topjui-menubutton"
       data-options="method:'openDialog',
       extend: '#sUserDg-toolbar',
       iconCls: 'fa fa-plus',
       btnCls: 'topjui-btn-blue',
       dialog:{
           id:'userAddDialog',
           title:'新增/编辑',
           href:'/sUser/add',
           buttonsGroup:[
               {text:'保存',url:'/sUser/save?flag=add',iconCls:'fa fa-plus',handler:'ajaxForm',btnCls:'topjui-btn-green'}
           ]
       }">新增</a>
    <a href="javascript:void(0)"
       data-toggle="topjui-menubutton"
       data-options="method: 'openDialog',
            extend: '#sUserDg-toolbar',
            iconCls: 'fa fa-pencil',
            btnCls: 'topjui-btn-green',
            grid: {
                type: 'datagrid',
                id: 'sUserDg'
            },
            dialog: {
                title:'新增/编辑',
                href:'/sUser/edit',
                url: '/sUser/detail?id={id}',
                buttonsGroup: [
                    {
                        text: '更新',
                        url: '/sUser/save?flag=edit',
                        iconCls: 'fa fa-save',
                        handler: 'ajaxForm',
                        btnCls: 'topjui-btn-green'
                    }
                ]
            }">编辑</a>
    <a href="javascript:void(0)"
       data-toggle="topjui-menubutton"
       data-options="method:'doAjax',
       extend: '#sUserDg-toolbar',
       btnCls:'topjui-btn-red',
       iconCls:'fa fa-trash',
       confirmMsg:'删除用户前请确认该用户名下的客户信息和业务信息已经转移，是否删除？',
       grid: {uncheckedMsg:'请先勾选要删除的数据',param:'id:id',updateRow:false},
       url:'/sUser/delete'">删除</a>
    <a href="javascript:void(0)"
       data-toggle="topjui-menubutton"
       data-options="method:'doAjax',
       extend: '#sUserDg-toolbar',
       btnCls:'topjui-btn-brown',
       iconCls:'fa fa-lock',
       confirmMsg:'是否确认锁定选择的用户？',
       grid: {uncheckedMsg:'请先勾选要锁定的数据',param:'id:id',updateRow:false},
       url:'/sUser/changests?status=I'">锁定</a>
    <a href="javascript:void(0)"
       data-toggle="topjui-menubutton"
       data-options="method:'doAjax',
       extend: '#sUserDg-toolbar',
       btnCls:'topjui-btn-green',
       iconCls:'fa fa-unlock',
       confirmMsg:'是否确认解锁选择的用户？',
       grid: {uncheckedMsg:'请先勾选要锁定的数据',param:'id:id',updateRow:false},
       url:'/sUser/changests?status=A'">解锁</a>
    <a href="javascript:void(0)"
       data-toggle="topjui-menubutton"
       data-options="method:'doAjax',
       extend: '#sUserDg-toolbar',
       btnCls:'topjui-btn-purple',
       iconCls:'fa fa-recycle',
       confirmMsg:'重置密码后请使用原密码将不可用，是否确认重置所选用户的密码？',
       grid: {uncheckedMsg:'请先勾选要重置密码的数据',param:'id:id',updateRow:false},
       url:'/sUser/resetpwd'">重置密码</a>
    <form class="search-box" id="queryForm" name="dataForm" method="post" action="/sUser/data">
        <input type="text" name="userAccount" data-toggle="topjui-textbox"
               data-options="prompt:'帐号',width:135">
        <input type="text" name="userName" data-toggle="topjui-textbox"
               data-options="prompt:'用户姓名',width:135">
        <a href="javascript:void(0)"
           data-toggle="topjui-menubutton"
           data-options="method:'query',
            iconCls:'fa fa-search',
            btnCls:'topjui-btn-red',
            form:{id:'queryForm'},
            grid:{type:'datagrid','id':'sUserDg'}">查询</a>
    </form>
</div>
<!-- 表格工具栏结束 -->
</body>
</html>
